package org.dromara.wms.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.wms.domain.WmsOrder;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 跟物品有关的订单视图对象 wms_order
 *
 * @author wenrui
 * @date 2024-03-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = WmsOrder.class)
public class WmsOrderVo implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 库单ID
   */
  @ExcelProperty(value = "库单ID")
  private Long id;

  /**
   * 单据名称
   */
  @ExcelProperty(value = "单据名称")
  private String name;

  /**
   * 单据类型
   */
  @ExcelProperty(value = "单据类型")
  private Long typeId;

  /**
   * 客户
   */
  @ExcelProperty(value = "客户")
  private Long partnerId;

  /**
   * 己方仓库id
   */
  @ExcelProperty(value = "己方仓库id")
  private Long selfWhId;

  /**
   * 对方仓库id
   */
  @ExcelProperty(value = "对方仓库id")
  private Long otherWhId;

  /**
   * 单据状态
   */
  @ExcelProperty(value = "单据状态", converter = ExcelDictConvert.class)
  @ExcelDictFormat(dictType = "wms_order_status")
  private String status;

  /**
   * 单据来源id
   */
  @ExcelProperty(value = "单据来源id")
  private Long sourceId;

  /**
   * 生产厂商
   */
  @ExcelProperty(value = "生产厂商")
  private Long manufacturerId;

  /**
   * 申请人
   */
  @ExcelProperty(value = "申请人")
  private Long applicantId;

  /**
   * 发货员
   */
  @ExcelProperty(value = "发货员")
  private Long execId;

  /**
   * 备注
   */
  @ExcelProperty(value = "备注")
  private String remark;

  /**
   * 子表集合
   */
  private List<WmsOrderLineVo> line;

}
